package com.zhl.excel;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;

import java.io.File;

/**
 * @program: demos
 * @description:
 * @author: 刘振华
 * @create: 2020-09-24 12:04
 **/
public class ExcelListener extends AnalysisEventListener<DateEo> {
	private String path;
	public ExcelListener(){

	}
	public ExcelListener(File file){
		String str = file.getAbsolutePath()+File.separator+file.getName();
		path = str.split("A5对应关系结果")[1];
	}
	@Override
	public void invoke(DateEo data, AnalysisContext analysisContext) {
//		String erpId = data.getSsbh();
//		if(null == erpId || "".equals(erpId)){
//			erpId = data.getSbbm();
//		}
//		if(null != erpId && EasyExcelDemo.len == erpId.length()){
//			EasyExcelDemo.set.add(erpId);
//		}

		System.out.println(data.getDate());

	}

	@Override
	public void doAfterAllAnalysed(AnalysisContext analysisContext) {
		System.out.println("=================END===============");
	}
}
